//
//  RequestSplashApi.m
//  HHNMobileCore
//
//  Created by huhmf on 15/8/18.
//  Copyright (c) 2015年 huhmf. All rights reserved.
//

#import "RequestSplashApi.h"


@implementation RequestSplashApi {
    
    NSString *_appVersion;
    NSString *_platform;
}
- (id)initWithAppVersion:(NSString *)appVersion andPlatForm:(NSString *) platform {
    if (self = [super init]) {
        
        _appVersion = appVersion;
        _platform = platform;
    }
    
    return self;
    
}
-(YTKRequestMethod)requestMethod
{
    return YTKRequestMethodPOST;
}

-(NSString *)requestUrl
{
    return @"/api/landPage.do";
}

-(NSInteger)cacheTimeInSeconds
{
    return -60*1;//为负数 不启用缓存
}

-(id)requestArgument
{
    return @{
             @"appVersion": [_appVersion length]?_appVersion:@"",
             @"platform": [_platform length]?_platform:@""
             };
}


-(NSDictionary *)requestHeaderFieldValueDictionary
{
    NSMutableURLRequest *request_M=(NSMutableURLRequest *)[super requestTask].currentRequest;
    NSString *strUrl=[NSString stringWithFormat:@"%@%@",@"",[self requestUrl]];
    NSDictionary *dict=[[HHNUtility sharedHHNInstance] setHttpHeaderWithUrl:strUrl Request:request_M];
    
    return dict;
}

-(long long)cacheVersion
{
    return  1;
}
@end
